function altertest(val){
	var listsize = document.getElementById('listsize').value;
	var pkid_string = '';
	for(var i=0;i<listsize;i++){
		if(document.getElementById('checkone'+i).checked){
			pkid_string += document.getElementById('checkone'+i).value+'|';
		}
	}
	if(pkid_string == ''){
		alert('请至少选择一条!');
		return false;
	}
	document.getElementById('pkid').value = pkid_string;
	document.getElementById('bpm_id').value ="1797";
	document.getElementById('state').value =val;
	document.indexForm.action='/doTradeReg.do';
	if(window.confirm('确认修改吗?')){
		document.indexForm.submit();
	}
}

function checkSub(){
	if(document.getElementById('tittle').value==''){
		alert('标题不能为空');
		document.getElementById('tittle').focus();
		return false;
	}
	
	if(document.getElementById('content').value==''){
		alert('内容不能为空');
		document.getElementById('content').focus();
		return false;
	}
	/**
	var area_attr="";
	if (document.getElementById("province").value != "") {
		area_attr = document.getElementById("province").value + "|";
	}
	if (document.getElementById("eparchy_code").value != "") {
		area_attr += document.getElementById("eparchy_code").value + "|";
	}
	if (document.getElementById("city_code").value != "") {
		area_attr += document.getElementById("city_code").value + "|";
	}
	if(area_attr!=""){
		document.getElementById("area_name").value = area_attr;
	}
	if(document.getElementById('state').value==''){
		alert('状态不能为空');
		document.getElementById('state').focus();
		return false;
	}
	*/
	
	document.addForm.submit();
}

function tijiao(){
	var tittle=document.getElementById('tittle').value;
	if(tittle==''){
		alert('标题不能为空');
		document.getElementById('tittle').focus();
		return false;
	}

	
	if(document.getElementById('content').value==''){
		alert('内容不能为空');
		document.getElementById('content').focus();
		return false;
	}
	
	document.updateForm.submit();
}

function search(){
	document.indexForm.submit();
}

function showUrl(val){
	window.open(val);
}

